import request from '@/utils/request'

export const contractList = (data) => { //合同管理-列表
  return request.request({
    url: '/maintenance-system/api/contractManagementRecord/page',
    method: 'post',
    data
  })
}

export const contractApproval = (data) => { //立项-立项申请-查询全部
  return request.request({
    url: '/maintenance-system/api/maintenance/project/approval/all',
    method: 'post',
    data
  })
}
export const contractAdd = (data) => { //合同管理-添加
  return request.request({
    url: '/maintenance-system/api/contractManagementRecord/add',
    method: 'post',
    data
  })
}
export const contractEdit = (data) => { //合同管理-编辑
  return request.request({
    url: '/maintenance-system/api/contractManagementRecord/edit',
    method: 'post',
    data
  })
}
export const contractDetails = (del,id) => { //合同管理-单条查询
  return request.request({
    url: '/maintenance-system/api/contractManagementRecord/'+del+"/"+id,
    method: 'get',
  })
}
export const contractDelete = (del,id) => { //合同管理-删除
  return request.request({
    url: '/maintenance-system/api/contractManagementRecord/del/'+del+'/'+id,
    method: 'get',
  })
}
export function contractExport(data) { //合同管理-导出
    return request({
        url: '/maintenance-system/api/contractManagementRecord/export',
        responseType: 'arraybuffer',
        method: 'post',
        data,
    })
}
